package cn.takovh.zpl.bean;

import java.util.UUID;

/**
 * @author zhangyu
 * @date 2022/6/30
 */
public class PlayListItem {
    private String id;
    private Boolean check;
    private String src;
    private String albumTitle;
    private String albumArtist;
    private String trackTitle;
    private String trackArtist;
    private Integer duration;
    private Boolean status;

    public PlayListItem() {
    }

    public PlayListItem(String id, Boolean check, String src, String albumTitle, String albumArtist,
                        String trackTitle, String trackArtist, Integer duration, Boolean status) {
        this.id = id;
        this.check = check;
        this.src = src;
        this.albumTitle = albumTitle;
        this.albumArtist = albumArtist;
        this.trackTitle = trackTitle;
        this.trackArtist = trackArtist;
        this.duration = duration;
        this.status = status;
    }

    public PlayListItem(Media media) {
        this(UUID.randomUUID().toString(), false, media.getSrc(), media.getAlbumTitle(),
                media.getAlbumArtist(), media.getTrackTitle(), media.getTrackArtist(),
                media.getDuration(), false);
    }

    public Media toMedia() {
        return new Media(src, albumTitle, albumArtist, trackTitle, trackArtist, duration);
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public Boolean getCheck() {
        return check;
    }

    public void setCheck(Boolean check) {
        this.check = check;
    }

    public String getSrc() {
        return src;
    }

    public void setSrc(String src) {
        this.src = src;
    }

    public String getAlbumTitle() {
        return albumTitle;
    }

    public void setAlbumTitle(String albumTitle) {
        this.albumTitle = albumTitle;
    }

    public String getAlbumArtist() {
        return albumArtist;
    }

    public void setAlbumArtist(String albumArtist) {
        this.albumArtist = albumArtist;
    }

    public String getTrackTitle() {
        return trackTitle;
    }

    public void setTrackTitle(String trackTitle) {
        this.trackTitle = trackTitle;
    }

    public String getTrackArtist() {
        return trackArtist;
    }

    public void setTrackArtist(String trackArtist) {
        this.trackArtist = trackArtist;
    }

    public Integer getDuration() {
        return duration;
    }

    public void setDuration(Integer duration) {
        this.duration = duration;
    }

    public Boolean getStatus() {
        return status;
    }

    public void setStatus(Boolean status) {
        this.status = status;
    }
}
